package com.example.worklab

import com.example.worklab.utils.ByteUtils
import com.example.worklab.utils.DigitalTrans
import org.junit.Test

import org.junit.Assert.*
import java.util.Arrays

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun testByte(){
        val b1 = ByteUtils.hexToByteArr("73")
        println("b1: ${b1.contentToString()}")
        val b11 = DigitalTrans.byte2hex(b1)
        println("b1-1: $b11")
        val b12 = DigitalTrans.bytetoString(b1)
        println("b1-2: $b12")

        val b2 = ByteUtils.hexToByteArr("61")
        println("b2: ${b2.contentToString()}")
        val b21 = DigitalTrans.byte2hex(b2)
        println("b2-1: $b21")
        val b22 = DigitalTrans.bytetoString(b2)
        println("b2-2: $b22")
    }
}